package gui;

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.LayoutManager;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

import org.jdesktop.layout.GroupLayout;

public class DatePanel extends JPanel {
	
	private javax.swing.JLabel DateLabel;
	private javax.swing.JButton jButton2;
	 private ImageIcon picture = new ImageIcon("icones/DatePanel.jpg");
	 private Image img = picture.getImage();


	public DatePanel() {
		
		DateLabel = new javax.swing.JLabel();
		jButton2 = new javax.swing.JButton();

//		DateLabel.setIcon(new javax.swing.ImageIcon(
//		"icones/DateLabel.jpg")); // NOI18N

jButton2.setBackground(new java.awt.Color(141, 178, 227));
jButton2.setBorder(null);
jButton2.setMaximumSize(new java.awt.Dimension(50, 50));
jButton2.setMinimumSize(new java.awt.Dimension(22, 22));
jButton2.setPreferredSize(new java.awt.Dimension(23, 23));
		
		GroupLayout DatePanelLayout = new GroupLayout(this);
		this.setLayout(DatePanelLayout);
		
		DatePanelLayout.setHorizontalGroup(DatePanelLayout.createParallelGroup(
				org.jdesktop.layout.GroupLayout.LEADING).add(
				DatePanelLayout
						.createSequentialGroup()
						.add(DateLabel)
						.addPreferredGap(
								org.jdesktop.layout.LayoutStyle.RELATED)
						.add(jButton2,
								org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
								org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
								org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
						.addContainerGap(168, Short.MAX_VALUE)));
		
		DatePanelLayout
				.setVerticalGroup(DatePanelLayout
						.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING)
						.add(org.jdesktop.layout.GroupLayout.TRAILING,
								DatePanelLayout
										.createSequentialGroup()
										.addContainerGap(
												org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
												Short.MAX_VALUE)
										.add(DatePanelLayout
												.createParallelGroup(
														org.jdesktop.layout.GroupLayout.BASELINE)
												.add(DateLabel)
												.add(jButton2,
														DatePanelLayout.PREFERRED_SIZE,
														org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
														org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))));
		
	}

	public void paintComponent(Graphics g) {
	    g.drawImage(img, 0, 0, null);
	  }


}
